//
//  HXHotCollectionCell.m
//  爱鲜蜂
//
//  Created by 建国 on 16/5/5.
//  Copyright © 2016年 建国. All rights reserved.
//
#import "HXGoodsView.h"
#import "HXHotCollectionCell.h"

@implementation HXHotCollectionCell

//- (void)awakeFromNib {
//    HXGoodsView *view = [HXGoodsView goodsView];
//    view.frame = self.bounds ;
//    [self.contentView addSubview:view];
//}

-(void)addtap{
 
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapHotCollectionCell:)];
    [self addGestureRecognizer:tap];
    
}

-(void)tapHotCollectionCell :(HXHotCollectionCell*)cell{
    [[NSNotificationCenter defaultCenter]postNotificationName:@"clickHotCell" object:self];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        HXGoodsView *view = [HXGoodsView goodsView];
        view.frame = self.bounds ;
        [self.contentView addSubview:view];
        [self addtap];
    }
    return self;
}

@end
